document.getElementById("myElement").style.cssText = "display: block; position: absolute";
//use template literals
document.getElementById("myElement").style.cssText = `
display: block;
position: absolute;
`;
document.getElementById("myElement").style.cssText = "display: block; position: absolute";
Object.assign(yourelement.style,{fontsize:"12px",left:"200px",top:"100px"});